package com.mall.httpResult;/*
 *
 *@author ojj
 *@date 2020/4/18 16:04
 *
 */

public enum ResultCodeEnum {

    SUCCESS(200, "success"),

    REDIRECT(301, "redirect"),

    BAD_REQUEST(400, "parameter error"),

    NOT_FOUND(404, "not found"),

    USER_EXIST(405, "user already exists"),

    PHONE_FORMAT_ERROR(406, "phone format error"),

    USER_NOT_EXIST(407, "user not exists"),

    PASSWORD_ERROR(408, "password error"),

    USER_ALREADY_LOGIN(409, "user already login"),

    SHOPPINGCAR_ITEM_NOTEXISTS(410, "shoppingCar item not exists"),

    SHOPPINGCAR_NOTEXISTS(411, "shoppingCar not exists"),

    ORDER_NOTFOUND(412,"order not exist"),

    ORDER_NOTRETURN(413,"order has not apply to return"),

    REPEATE_EVALUATE(414,"Repeated comments"),

    SERVER_ERROR(500, "server_error");


    private int code;

    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }
}
